<template>

  <section @click="clickCurrent('current')" @mousedown="clickCurrent('dragging')">
      <div  :class="['custorm--modelbox', 'goodscol-show', (custormCurrent == custormIndex)?'drag active':'drag']">
         <div v-if="custormItemData.params.isshow&&custormItemData.params.isshow == '2'" class="noshow" v-bind:style="{'background-image':`url(${getPath('noshow.png')})`}"></div>
           <div class="group-buy flex-row flex-justify-a flex-align-c">
                <div style="display:flex;">
                    <img :src="getPath('default_picture.png')" alt="" width="60px" height="60px" style="border-radius:50%;">
                     <div style="margin-left:10px;">
                         <div style="font-size:16px;">名扬天下</div>
                         <div style="background:rgba(248,248,248,1);padding:5px;">未加入超级会员卡</div>
                     </div>
                     <div style="width:150px;">
                        <div style="display:flex;">
                            <div style="padding:10px;" v-if="custormItemData.paramsxdata.indexOf(custormItemData.paramsdata[0]) !=-1 ">
                                <div style="font-weight:normal;font-size:18px;" >
                                    0
                                </div>
                                <div>
                                    {{custormItemData.paramsdata[0]}}
                                </div>
                            </div>
                            <div style="padding:10px;" v-if="custormItemData.paramsxdata.indexOf(custormItemData.paramsdata[1]) !=-1 ">
                              <div style="font-weight:normal;font-size:18px;">
                                  0
                              </div>
                              <div>
                                    {{custormItemData.paramsdata[1]}}

                              </div>
                          </div>
                          <div style="padding:10px;" v-if="custormItemData.paramsxdata.indexOf(custormItemData.paramsdata[2]) !=-1 ">
                            <div style="font-weight:normal;font-size:18px;">
                                0
                            </div>
                            <div>
                                  {{custormItemData.paramsdata[2]}}
                            </div>
                          </div>

                          <div style="padding:10px;" v-if="custormItemData.paramsxdata.indexOf(custormItemData.paramsdata[3]) !=-1 ">
                            <div style="font-weight:normal;font-size:18px;">
                                0
                            </div>
                            <div>
                                  {{custormItemData.paramsdata[3]}}
                            </div>
                        </div>
                        <div style="padding:10px;" v-if="custormItemData.paramsxdata.indexOf(custormItemData.paramsdata[4]) !=-1 ">
                          <div style="font-weight:normal;font-size:18px;">
                              0
                          </div>
                          <div>
                                {{custormItemData.paramsdata[4]}}
                          </div>
                      </div>
                        </div>
                     </div>
                </div>
            </div>
            <div class="btn-edit-del" @click="delCurrent"><span class="btn-del iconfont icon icon-close"></span></div>
      </div>
  </section>
</template>

<script>
import defaultConfig from './utils/showConfig'
export default {
  mixins: [defaultConfig.mixins],
  props: {
    defaultConfig: {
      type: Object,
      default: function() {
        return defaultConfig
      }
    }
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.group-buy {
  width: 100%;
  height: 90px;
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(221, 221, 221, 0.5);
  box-shadow: 0px 2px 12px 0px rgba(221, 221, 221, 0.35);
  border-radius: 10px;
  span:nth-of-type(1) {
      color: #333333;
      font-size: 14px;
  }
  span:nth-of-type(2) {
      color: #999999;
      font-size: 12px;
  }
}
.custorm--modelbox.goodscol-show {
  .line-through {
    text-decoration: line-through;
  }

  .drag .btn-edit-del {
    height: 16px;
    width: 16px;
    position: absolute;
    right: 0;
    top: 0;
    display: none;
    z-index: 11;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    background: #fb6638;
    border-radius: 0 0 0 100%;
  }

  .drag .btn-edit-del .icon-close {
    font-size: 12px;
    position: absolute;
    right: 0;
    top: 0;
    left: 0;
    bottom: 0;
    text-align: right;
    line-height: 1.4;
  }

  .es-goods-item {
    position: relative;
    height: auto;
    // padding: 14px;
    background: #fff;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
  }

  .es-goods-header {
    line-height: 1;
    padding: 15px 0;

    .title {
      color: #333;
      font-weight: 600;
      font-size: 17px;
      margin-bottom: 5px;
    }

    .sub-title {
      font-size: 12px;
      color: #999;
    }

    .count-num {
      color: #333;
      font-size: 17px;

      span {
        font-size: 24px;
      }
    }
  }

  .es-goods-group.block.one .es-goods-item {
    float: none;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .es-goods-group.block .es-goods-item {
    width: 50%;
    float: left;
    border-bottom: 0;
    background: none;
    padding: 5px;
    display: block;
    border-radius: 2px;
  }

  .es-goods-group.block .es-goods-item {
    border-radius: 4px;
  }

  .es-goods-item .image {
    float: left;
    background-size: cover;
    position: relative;
    background-repeat: no-repeat;
    background-position: 50%;

    &.display-2 {
      width: 100px;
      height: 100px;
    }
  }

  .one .es-goods-item .image.showIcon .icon-attr,
  .two .es-goods-item .image.showIcon .icon-attr {
    position: absolute;
    font-style: normal;
    top: -25px;
    left: -24px;
    width: 80px;
    height: 80px;
    background-size: 80px;
    z-index: 10;
    color: #fff;
    font-size: 21px;
    -webkit-transform: scale(0.5);
    transform: scale(0.5);
    padding-right: 7px;
    line-height: 12px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    background-position: center;
    background-repeat: no-repeat;
  }

  .es-goods-item .image.showIcon .icon-attr {
    position: absolute;
    top: -18px;
    left: -19px;
    width: 60px;
    height: 60px;
    background-size: 60px;
    white-space: nowrap;
    font-style: normal;
    z-index: 10;
    color: #fff;
    font-size: 21px;
    -webkit-transform: scale(0.5);
    transform: scale(0.5);
    padding-right: 7px;
    line-height: 12px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    background-position: center;
    background-repeat: no-repeat;
  }

  .es-goods-group.block .es-goods-item .image {
    width: 100%;
    height: auto;
    margin: 0;
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .es-goods-group.block .es-goods-item .image {
    float: none;
  }

  .es-goods-group.block.one .es-goods-item .image {
    height: 175px;
    overflow: hidden;
  }

  .es-goods-group.block.one .es-goods-item .image > div:not(.qglist-i-t-bar) {
    height: 175px;
    background-size: cover;
    background-position: 50%;
  }

  .es-goods-item .detail {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    line-height: 1.5;
    background: #fff;
    padding-left: 10px;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -ms-flex-direction: column;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
  }

  .line-hide {
    white-space: nowrap;
  }

  .line-hide,
  .two-line-hide {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .es-goods-group .es-goods-item .detail .name {
    margin-top: 6px;
    font-size: 14px;

    &.display-1 {
      line-height: 24px;
      font-size: 16px;
      margin-top: 10px;

      .icon-tip {
        height: 24px;
        line-height: 24px;
        font-size: 12px;
        font-style: normal;
        margin-right: 5px;
        padding: 0 9px;
        background-color: #ffd93f;
        border-radius: 2px;
        display: inline-block;
      }
    }

    &.display-3 {
      line-height: 18px;
      margin-top: 10px;
      height: 35px;
      white-space: normal;
      text-overflow: ellipsis;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
  }

  .es-goods-group .es-goods-item .detail .name {
    font-size: 15px;
    color: #3d404d;
    line-height: 1;
  }

  .es-goods-group .es-goods-item .detail .subtitle {
    font-size: 12px;
    color: #999ca7;
    height: 18px;
    margin-top: 6px 0 4px;
  }

  .es-goods-item .detail .buy {
    display: inline-block;
    height: 22px;
    color: #fff;
    line-height: 22px;
    padding: 0;
    width: 32px;
    border-radius: 2px;
    text-align: center;
    border: 1px solid transparent;
    float: right;
    -webkit-align-self: flex-end;
    -ms-flex-item-align: end;
    align-self: flex-end;
  }

  .es-goods-item .detail .buy.buybtn1 {
    border: 1px solid #f55;
    background: #f55;

    &.display-1,
    &.display-2 {
      position: absolute;
      right: 0;
      width: 72px;
      height: 28px;
      line-height: 28px;
      color: #fff;
      font-size: 14px;
      text-align: center;
      font-weight: normal;
      margin: 0;
      background-color: #ff4040;
      border-radius: 4px;
    }
  }

  .es-goods-item .detail .buy.buybtn2 {
    height: 36px;
    width: auto;
    white-space: nowrap;
    line-height: 36px;
    color: #ffe200;
    font-size: 14px;
    margin: 0;
    margin-right: -22.5px;
    padding: 0 10px 0 3px;
    background-color: #2d2d2d;
    border-radius: 1px 0 5px 2px;
    position: absolute;
    top: 0;
    right: 0;
    display: inline-block;

    &.display-1,
    &.display-2 {
      &::before {
        content: "";
        width: 0;
        height: 0;
        border-width: 18px;
        border-style: solid;
        border-color: transparent #2d2d2d transparent transparent;
        position: absolute;
        top: 0;
        left: -35px;
      }

      &:after {
        content: "";
        width: 2px;
        height: 2px;
        border-width: 7.5px;
        border-style: solid;
        border-color: transparent transparent transparent #2d2d2d;
        position: absolute;
        top: -7px;
        right: -7px;
      }
    }
  }

  .es-goods-group .es-goods-item .detail .sold {
    color: #999;
  }

  .es-goods-item .detail .sold {
    font-size: 11px;
    color: #999;

    &.display-1 {
      color: #999;
      font-size: 12px;
      margin: 0;
      margin-top: 3px;
    }
  }

  .es-goods-item .detail .price {
    &.display-1 {
      position: relative;
      color: #ff4040;
      font-size: 20px;
      font-weight: 600;
      margin: 0;
      -webkit-flex-shrink: 1;
      flex-shrink: 1;

      .text span {
        overflow: hidden;
        font-size: 20px;
        text-overflow: ellipsis;
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
      }
    }

    .text {
      color: #fd463e;
      font-weight: 700;
    }
  }

  .es-goods-item .detail .price .text span {
    font-size: 16px;
  }

  .es-goods-group.block .es-goods-item .detail {
    padding: 8px;
    // overflow: hidden;
    line-height: 1.5;

    &.display-3 {
      padding: 0;
    }
  }

  .es-goods-group.block .es-goods-item .detail .productprice {
    height: 24px;
    line-height: 24px;
  }

  .es-goods-item .detail .price .productprice {
    text-decoration: line-through;
  }

  .es-goods-group .es-goods-item .detail .productprice {
    width: 100%;
    color: #999;
    font-size: 11px;
    overflow: hidden;
  }

  .es-goods-item .detail .price .productprice {
    color: #999;
    font-size: 12px;
  }

  .es-goods-group:after {
    display: block;
    overflow: hidden;
    visibility: hidden;
    width: 0;
    height: 0;
    content: "";
    clear: both;
  }

  .es-goods-item .detail .buy.buybtn3 i {
    font-size: 20px;
    line-height: 0;
  }

  // 切换
  .es-goods-item .detail .buy.buybtn6 {
    vertical-align: middle;
    width: 22px;
    height: 22px;
    text-align: center;
    line-height: 22px;
    border-radius: 50%;
    color: #fff;
    background: #f55;
  }

  .es-goods-item .detail .buy.buybtn3 {
    color: #f55;
    vertical-align: middle;
    width: 22px;
    padding: 0;
    text-align: center;
    line-height: 22px;
  }

  // 第二个列表
  .es-goods-group {
    height: auto;
    background: #ffffffff;
  }

  .list {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
  }

  .es-goods-item .image img {
    height: 100%;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
  }

  .es-goods-group.list .es-goods-item .detail {
    width: 0;
    overflow: hidden;
  }

  .es-goods-item .detail {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    line-height: 1.5;
    background: #fff;
    padding-left: 10px;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    -webkit-box-orient: vertical;
    -ms-flex-direction: column;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
  }

  .es-goods-group .es-goods-item .detail .subtitle {
    font-size: 12px;
    color: #999ca7;
    height: 18px;
    margin-top: 6px 0 4px;
  }

  .list .es-goods-item .detail .price {
    position: static;
  }

  .es-goods-group.block.three2 .es-goods-item {
    width: 100px;
    box-sizing: border-box;
  }

  .es-goods-group.block .es-goods-item .image {
    float: none;
  }

  .es-goods-item .image {
    float: left;
    background-size: cover;
    position: relative;
    background-repeat: no-repeat;
    background-position: 50%;
  }

  .es-goods-group.block {
    .es-goods-item .image {
      .img {
        height: 100%;
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        display: block;
      }

      &.display-3 {
        img {
          width: 176.5px;
          height: 164px;
          object-fit: cover;
          margin: 0 auto;
          border-radius: 10px;
          display: block;
        }
      }
      &.display-5 {
        img {
          width: 176.5px;
          height: 120.5px;
          object-fit: cover;
          border-radius: 10px;
          display: block;
        }
      }
    }
  }

  .es-goods-group.block.three2 .es-goods-item {
    width: 100px;
  }

  .es-goods-group.block.three2 .es-goods-item img {
    height: 90px;
  }

  .es-goods-group.block.three2 {
    .es-goods-item .detail .price .text {
      color: #fd463e;
      font-weight: 700;
    }

    .es-goods-item .detail .price .text {
      color: #f55;
      font-size: 13px;
    }

    .es-goods-group.three .es-goods-item .price .text span {
      font-size: 12px;
    }

    .es-goods-item .detail .price .text span {
      font-size: 16px;
    }

    .es-goods-item .detail .buy.buybtn1 {
      border: 1px solid #f55;
      background: #f55;
    }

    .es-goods-item .detail .buy.buybtn3 {
      color: #f55;
      vertical-align: middle;
      width: 22px;
      padding: 0;
      text-align: center;
      line-height: 22px;
    }

    .es-goods-item .detail .buy.buybtn6 {
      vertical-align: middle;
      width: 20px;
      text-align: center;
      line-height: 20px;
      border-radius: 50%;
      color: #fff;
      background: #f55;
    }

    .es-goods-item .detail .buy {
      display: inline-block;
      height: 20px;
      color: #fff;
      line-height: 20px;
      padding: 0;
      width: 32px;
      border-radius: 2px;
      text-align: center;
      border: 1px solid transparent;
      float: right;
      font-size: 12px;
      -webkit-align-self: flex-end;
      -ms-flex-item-align: end;
      align-self: flex-end;
    }

    .es-goods-group:after {
      display: block;
      overflow: hidden;
      visibility: hidden;
      width: 0;
      height: 0;
      content: "";
      clear: both;
    }
  }

  .es-goods-group.block.two.swiper {
    white-space: nowrap;
    overflow: hidden;
    vertical-align: middle;

    .es-goods-item {
      display: inline-block;
      float: none !important;
      width: 45%;
      vertical-align: middle;

      .display-3 img {
        width: 157.8px;
        height: 157.8px;
        margin: 0 auto;
      }

      .display-5 img {
        width: 157.8px;
        height: 110px;
      }
    }
  }

  .es-goods-group.block.three2 .es-goods-item .detail .price {
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    font-size: 14px;
  }

  .es-goods-group .es-goods-item .detail .name {
    font-size: 13px;
    color: #3d404d;
    line-height: 1;
  }

  .es-goods-group.three .es-goods-item.active {
    width: 135px;
  }

  .es-goods-group.block.three2 {
    width: 9999px;
  }

  .qglist-i-t-bar {
    line-height: 36px;
    background: -webkit-linear-gradient(90deg, #ff7e42, #fb2f52);
    background: linear-gradient(90deg, #ff7e42, #fb2f52);
    border-radius: 70px 0 0 70px;
    box-sizing: initial;
    position: absolute;
    top: -36px;
    padding-top: 36px;
    right: 0;

    .qglist-i-t-bar-d {
      display: -webkit-flex;
      display: flex;
      justify-content: flex-start;

      .qglist-i-t-bar-l {
        color: #fff;
        font-size: 14px;
        padding: 0 20px 0 15px;

        .qglist-i-t-bar-l .i {
          font-size: 16px;
          vertical-align: -1px;
          margin-right: 4px;
          display: inline;
        }

        .qglist-i-t-bar-l .em {
          font-style: normal;
          font-weight: 600;
          display: inline;
        }
      }

      .qglist-i-t-bar-r {
        padding: 5.4px 10px 5.4px 0;
      }
    }
  }
}
</style>
